import myalert from '../../utils/alert';
export async function uploadImage(localFile) {
  myalert.loading()
  var user = AV.User.current();
  var file = new AV.File('some file name', localFile);
  var _file = await file.save();
  user.set('avtar', _file);
  await user.save();
  myalert.clear()
}
export function getUser() {
  return AV.User.current()
}
export async function updateUser(username) {
  myalert.loading()
  var _user = AV.User.current()
  _user.set('username', username);
  await _user.save();
  myalert.clear()
  myalert.success("update success")
}
